﻿/*-----------------------------------------------------------------------------------------------
// Copyright (C) 2016 华跃博弈科技有限公司 
//
// 文件名：        SysUserService.cs
// 文件功能描述：   系统用户管理业务逻
//
// 
// 创建标识：       庞永飞  2016-04-24
//
// 修改标识：
// 修改描述：
//
// 备注：	
// 				
//-----------------------------------------------------------------------------------------------*/

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using HYBY.Task.DataEntity;
using HYBY.Task.Repository;
using HYBY.Task.Service.IService;


namespace HYBY.Task.Service {

  public class SysUserService : BaseService<SysUserRepository, SysUserEntity>, ISysUserService {

    public List<SysUserEntity> GetSysUsers() {
      return Repository.GetSysUsers();
    }
    
    /// <summary>
    /// 分页方式返回
    /// </summary>
    /// <param name="PageIndex">页面索引</param>
    /// <param name="PageSize">页面大小</param>
    /// <param name="RecordCount">总记录数</param>
    /// <returns></returns>
    public List<SysUserEntity> GetSysUsers(String searchKey,int pageIndex,int pageSize,out int recordCount){
        return Repository.GetSysUsers(searchKey,pageIndex,pageSize,out recordCount);
    }

    /// <summary>
    /// 根据检索条件以分页方式返回系统用户
    /// </summary>
    /// <param name="Search">分页及检索条件</param>
    /// <param name="RecordCount">总记录数据</param>
    /// <returns></returns>
    public List<SysUserEntity> GetSysUsers(PageAndSearchInfo search, out int recordCount) {
        return GetSysUsers(search.SearchKey, search.PageIndex, search.PageSize, out recordCount);
    }
  }
}